package com.ly.mpayment.persist.service.downshopinfo;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

import com.ly.mpayment.persist.entity.DownRechargeFlow;
import com.ly.mpayment.persist.entity.DownShopInfo;
import com.ly.mpayment.persist.entity.User;
import com.ly.mpayment.persist.hibernate.Page;
import net.sf.json.JSONObject;

/**
 *  下游渠道信息
 *
 *
 */
public interface IDownShopInfoService {

	public boolean addDownShopInfo(DownShopInfo info);
//
	public boolean addDownShopInfo(DownShopInfo info,User user);
//
	public boolean updateDownShopInfoSubtract(DownShopInfo shop,DownRechargeFlow flow);

	public boolean updateDownShopInfoAdd(DownShopInfo shop,DownRechargeFlow flow);
//
//	public boolean updateShopAmount(DownShopInfo info,User userAdmin,BigDecimal big,String remark,int paytype);

	public boolean updateDownShopInfo(DownRechargeFlow flow,DownShopInfo shop,BigDecimal big, String remark,int payType,User userAdmin);

	public DownShopInfo findById(String id);

	public DownShopInfo findByIdSql(String id);

	public Page<DownShopInfo> findPageDownShopInfo(Map<String, Object> parameters,int start,int pageSize);

	public Page<DownShopInfo> findBroadShopPage(Map<String, Object> parameters,int start,int pageSize);



	public DownShopInfo findShopNum(String shopNum);

	public DownShopInfo findShopIp(String ip);

	public DownShopInfo findByCallUrl(String partnerid);

	/**
	 * 查询正常下游用户
	 * @param userUuid
	 * @return
	 */
	public DownShopInfo findShopInfoByUuid(String userUuid);

	public DownShopInfo findOneBroadShop(String userUuid);

	public List<DownShopInfo> findShopList(String province);

	public List<DownShopInfo> findShopList(Map<String, Object> parameters);

	public DownShopInfo findShopInfoForMaintenance(String userUuid);

	public DownShopInfo findShopInfoByuseruuid(String userUuid);

	public String findDownBill(Map<String, Object> parameters, int start,int pageSize);


	boolean updateDownShopInfoDownKey(DownShopInfo shop);

	List<JSONObject> findDownshopBalance();

	List<JSONObject> findUpshopBalance();

	List<JSONObject> findMerchantcredit();

	List<JSONObject> downArtificial();

	List<JSONObject> upArtificial();

	List<JSONObject> downStreamcard();

	List<JSONObject> upOrderMinute();

	JSONObject findByBillUserId(String useruuid,String startTime,String endtTime);

	boolean noticeDownSwitch(JSONObject json);
}
